﻿@using Webdiyer.WebControls.Mvc
@{
    Layout = null;
    ViewBag.Nav = 1;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>病例录入</title>
    @Html.Partial("meta")
</head>
<body id="b_main">
    @Html.Partial("header")
    <!--/end #header-->
    <div id="wrapper">
        <!--/end #menu_main-->
        <div id="content">
            @Html.Partial("nav")
            @using (Html.BeginForm("manage", "account", FormMethod.Post, new { @class = "broom_form", id = "form1", style = "margin-left: 30px;" }))
            {
                <a href="@Url.Action("createuser", "account")">创建用户</a><br />
                <br />
                if (ViewBag.Users != null)
                {
                <h4 class="titlebold">
                    搜索结果列表:共计@{@ViewBag.RecordCount}
                    项</h4>
                <table cellspacing="0" summary="table" class="broom_table">
                    <tbody>
                        <tr class="odd titlebold">
                            <td>
                                用户名
                            </td>
                            <td>
                                电话
                            </td>
                            <td>
                                负责人
                            </td>
                            <td>
                                地区
                            </td>
                            <td>
                                角色
                            </td>
                            <td>
                                操作
                            </td>
                        </tr>
                        @{var index = 0;}
                        @foreach (var m in (List<Dal.Models.User>)ViewBag.Users)
                        {
                            index++;
                            <tr class="@(index % 2 == 1 ? "even" : "odd")">
                                <td>
                                    @m.UserName
                                </td>
                                <td>
                                    @m.Tel
                                </td>
                                <td>
                                    @m.ChargeMan
                                </td>
                                <td>
                                </td>
                                <td>
                                    @if (m.Role == 1)
                                    {<text>管理员</text>}
                                    @if (m.Role == 0)
                                    {<text>普通用户</text>}
                                    @if (m.Role == 2)
                                    {<text>审核员</text>}
                                </td>
                                <td>
                                    @Html.ActionLink("修改", "createuser", new { UserID = m.ID }) @Html.ActionLink("删除", "deleteuser", new { UserID = m.ID, onclick = "return confirm('确定要删除吗?')" })
                                </td>
                            </tr>
                        }
                    </tbody>
                </table>
                @Html.Pager((int)ViewBag.RecordCount, 10, (int)ViewBag.PageIndex, "manage", "account", null, null, null, new { @class = "pagination" })
                }
            }
            <!--/end .tabber-->
        </div>
        <!--/end #content-->
        <ul id="footer">
        </ul>
    </div>
    <div class="clear">
    </div>
</body>
</html>
